{% extends "sil29VitrineBundle::layout.html.twig" %}
{% block content %}
	

	<div class="span9">
    <ul class="breadcrumb">
		<li><a href="{{ path('sil29_vitrine_homepage') }}">Accueil</a> <span class="divider">/</span></li>
		<li class="active"> PANIER</li>
    </ul>
	<h3>  PANIER [ <small>{{ nombreArticles}} Element(s) </small>]<a href="products.html" class="btn btn-large pull-right"><i class="icon-arrow-left"></i> Continuer les achats </a></h3>	
	<hr class="soft"/>
			
	<table class="table table-bordered">
              <thead>
                <tr>
                  <th>Produit</th>
                  <th>Description</th>
                  <th>Quantité</th>
				  <th>Prix</th>
                  <th>Total</th>
				</tr>
              </thead>
              <tbody>
              {% for ligneAffaire in panier.contenu %}
                <tr>
                  <td> <img width="42px" height="42px" src="{{asset('bundles/sil29vitrine/images/'~ ligneAffaire[0].imageSrc)}}" alt=""/></td>
                  <td>{{ ligneAffaire[0].nom }}<br/>{{ ligneAffaire[0].description }}</td>
				  <td>
					<div class="input-append"><input class="span1" style="max-width:34px" placeholder="{{ ligneAffaire[1] }}" id="appendedInputButtons" size="16" type="text">
					<form action="{{ path('sil29_vitrine_diminuerQuantiteArticle') }}" method="post"><input type="hidden" name="ligne" value="{{ ligneAffaire[0].id }}"/><button class="btn" type="submit"><i class="icon-minus"></i></button></form>
					<form action="{{ path('silZ9_vitrine_augmenterQuantiteArticle') }}" method="post" ><input type="hidden" name="ligne" value="{{ ligneAffaire[0].id }}"/><button class="btn" type="submit"><i class="icon-plus"></i></button></form>
					<form action="{{ path('sil29_vitrine_supprimerArticle') }}" method="post"><input type="hidden" name="ligne" value="{{ ligneAffaire[0].id }}"/><button class="btn btn-danger" type="submit"><i class="icon-remove icon-white"></i></button></form>
					</div>
				  </td>
                  <td>{{ ligneAffaire[0].prix }} €</td>
                  <td>{{ ligneAffaire[0].prix *  ligneAffaire[1] }} €</td>
                </tr> 
              {% endfor %}
				 <tr>
                  <td colspan="6" style="text-align:right"><strong>TOTAL =</strong></td>
                  <td class="label label-important" style="display:block"> <strong>{{  montantPanier }} € </strong></td>
                </tr>
				</tbody>
            </table>
			
	<a href="{{ path('sil29_vitrine_homepage') }}" class="btn btn-large"><i class="icon-arrow-left"></i> Continuer les achats </a>
	<a href="{{ path('sil29_vitrine_validationPanier') }}" class="btn btn-large pull-right">Commander <i class="icon-arrow-right"></i></a>
</div>
{% endblock %}